home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / New System Software Extensions / QuickDraw™ GX 1.1.2 / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / ReadMe --Why a new LW IIsc?? < prev   
Encoding:
Text File  |  1995-04-10  |  4.2 KB  |  50 lines  |  [TEXT/ttxt]

  1.  
  2. Just prior to this seed of QuickDraw™ GX, we discovered a major problem with the LaserWriter IIsc GX sample printer driver.  We are concerned that this problem (described briefly below) will be propagated through developers' drivers if they use the existing LaserWriter IIsc driver as sample code.  Included is a corrected version the LaserWriter IIsc sample printer driver.  If you have any questions or problems with the corrected printer driver, please send an AppleLink to DEVSUPPORT.
  3.  
  4. We apologize for this inconvenience, but firmly believe that this change will prevent further headaches and incompatibilities for you down the road.
  5.  
  6. Sincerely,
  7.  
  8. The QuickDraw™ GX Team
  9.  
  10.  
  11. -----------------------------------------------------------------------------------------------------
  12.  
  13. A brief description of the problem follows:
  14.  
  15. The LaserWriter IIsc sample code which originally shipped on the GX 1.0 SDK and the MacOS™ 1.0 SDK has an incorrect override of gxDespoolPage.  In this override, the LaserWriter IIsc driver examines the format of the despooled page, and the contents of the current imageDataHandle.  In itself, these are quite legitimate things. But, believing that this data reflects the actual output characteristics which will be used for printing, the driver then proceeds to set up its page imaging data using this information.
  16.  
  17. In fact, if a paper mismatch occurs, the dimensions of the page format may change radically after a gxDespoolPage override.  (Paper mismatch handling is performed by the default implementation of the gxImagePage message, after sending the gxDespoolPage message.)
  18.  
  19. This bug may cause output to appear incorrectly when you try to crop, scale, tile or redirect pages to other papertypes.  For QuickDraw GX 1.1, we've added a new message called gxSetupPageImageData.  This message is sent at the beginning of each page, prior to gxStartSendPage, and is the earliest message that you can override in order to determine the dimensions of the format and image used for printing.  And, unlike gxStartSendPage, the message is not deferred until device communication time if you are printing to an image file.
  20.  
  21. The new LaserWriter IIsc sample printer driver uses this new message and hence requires QuickDraw GX 1.1 or greater to be installed. If a driver which uses this message is running under GX 1.0.x then an alert needs to be displayed(or another code path taken).  Since releases of QuickDraw GX previous to 1.1 do not send the new message, your driver cannot rely on it for anything earlier than 1.1.  Your override will never be called.
  22.  
  23. Also, versions of GX prior to 1.1 only check the major revision of the driver's (gxPrintingDriverBaseID) 'vers' resource.  (As a reminder, this version resource indicates the minimum version of QuickDraw GX that the driver or extension requires.)  This means that a 1.0.x GX system will allow 1.1 dependant drivers to be run on it.  This has been changed for 1.1; we now compare the major and minor revisions. 
  24.  
  25. There are three places where this check needs to be done if you wish to disable your driver under 1.0.x:
  26.  
  27.  1. In an override to gxHandleChooserMessage so that
  28.      new desktop printers aren't created.
  29.  2. In an override to gxStartJob so that printing can't be
  30.      invoked from applications.
  31.     3. In an override to gxImageJob so that printing which
  32.      has been started by dragging a spoolfile to an existing
  33.      desktop printer is aborted.
  34.  
  35. In each of these three places you should call a routine that does the following:
  36.  
  37.     1. Check the version number returned by the Gestalt selector 'qdgx'.
  38.     2. If the version is greater than or equal to 0x00010100,
  39.      then return noErr because GX version 1.1 or later is running.
  40.     3. If the version is pre-1.1 then you should:
  41.           Put up an alert telling the user the driver is newer than
  42.           the installed version of GX.
  43.           Return a gxDriverVersionErr to stop printing.
  44.           (This error is defined in PrintingErrors.h)
  45.  
  46. This revised version of the LaserWriter IIsc sample printer driver now includes this version checking code.
  47.  
  48. Finally, your gxPrintingDriverBaseID 'vers' resource should also be set to version 1.1 if you override (and depend on) gxSetupPageImageData.  Although the minor revision will have no effect on 1.0.x systems, 1.1 is still the correct value for the resource.
  49.  
  50.